package online.hxstar.learn.chapter1;

import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.ChannelInboundHandlerAdapter;
import lombok.extern.slf4j.Slf4j;

/**
 * @author xinghu
 * @version 1.0
 * @date 2019/11/7 6:03 下午
 */
@Slf4j
public class ConnectHandler extends ChannelInboundHandlerAdapter {
	@Override
	public void channelActive(ChannelHandlerContext ctx) throws Exception {
		//当一个新的连接已经被建立时channelActive(ChannelHandler Context)将会被调用
		log.info("Client " + ctx.channel().remoteAddress() + " connected");
	}
}
